package org.offsync.rich

case class RichIterator[T](iterator: java.util.Iterator[T]) {
  def consume(f: T => Unit): Unit = {
    while (iterator.hasNext) {
      f(iterator.next())
      iterator.remove()
    }
  }
}
